using zhwy.saas.api.Entity.Sys;
using zhwy.saas.api.Models.Sys.Users;

namespace zhwy.saas.api.Services.Sinterface.Sys
{
    /// <summary>
    /// 系统用户服务接口
    /// </summary>
    public interface ISysUserService : IBaseService<UsersEntity>
    {
        /// <summary>
        /// 获取租户管理员账户信息
        /// </summary>
        /// <param name="tenant_id"></param>
        /// <returns></returns>
        Task<GetTenantAdminUserInfoRes> GetTenantAdminUserInfo(long tenant_id);
        /// <summary>
        /// 修改用户密码
        /// </summary>
        /// <param name="userId">用户ID</param>
        /// <param name="newPassword">新密码</param>
        /// <returns>是否修改成功</returns>
        Task<bool> ChangePasswordAsync(long userId, string newPassword);

        /// <summary>
        /// 更新用户状态
        /// </summary>
        /// <param name="userId">用户ID</param>
        /// <param name="status">新状态</param>
        /// <returns>是否更新成功</returns>
        Task<bool> UpdateStatusAsync(long userId, int status);

        /// <summary>
        /// 检查用户帐号是否存在
        /// </summary>
        /// <param name="username"></param>
        /// <returns></returns>
        Task<bool> CheckUserNameExists(string username);

        /// <summary>
        /// 租户添加账户信息
        /// </summary>
        /// <param name="tenantsEntity">租户信息</param>
        /// <param name="Password"></param>
        /// <param name="UserName"></param>
        /// <returns></returns>
        Task<bool> CreateTenantSysUserAsync(TenantsEntity tenantsEntity, string UserName, string Password);
    }
}